$(function() {
    tinyMCE.init({
        mode:'textareas'
    });
      
    $("#country").change(function() {
       loadText();
    });
    
    function loadText() {
        //In this example you fetch them from the var xml. Later on you can fetch them through a get() function.
        //$.get('file.xml',{}, function(xml) {
         var value = $("#country option:selected").val();
            $('nodes',xml).each(function() {
                //Get id of selected XML node
                id = $(this).find("id").text(); 
                //Get description of selected XML node
                desc = $(this).find("desc").text();
                if (value != "") {
                    if (id.toLowerCase() == value.toLowerCase()) {
                        tinyMCE.activeEditor.setContent(desc);
                    }
                }
            });
            
        //});
    }
});

$("#submit").click(function() {
    var editorContent = tinyMCE.get('tinyeditor').getContent();
    if (editorContent == '')
    {
        $('#message').html('Editor empty');
    }
    else
    {
        $('#message').html('');
    }
})